package com.erp.dto;

import java.util.Date;

import com.erp.domain.TExamine;

/**
 * 审批类，序列化后存入数据库，所以不需要ID
 * 
 * @author 陈凯
 * 
 */
public class Examine implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;
	private User auditor;// 审批人
	private Date examineTime;// 审批时间
	private Integer opinion;// 审批意见
	private String taskId;// 任务编号
	private String note;// 审批备注
	private Apply apply;// 对应的申请表

	public Examine() {
	}

	public Examine(TExamine tExamine) {
		this.id = tExamine.getId();
		this.auditor = new User(tExamine.gettAuditor());
		this.examineTime = tExamine.getExamineTime();
		this.opinion = tExamine.getOpinion();
		this.taskId = tExamine.getTaskId();
		this.note = tExamine.getNote();
		this.apply = new Apply(tExamine.gettApply());
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public User getAuditor() {
		return auditor;
	}

	public void setAuditor(User auditor) {
		this.auditor = auditor;
	}

	public Date getExamineTime() {
		return examineTime;
	}

	public void setExamineTime(Date examineTime) {
		this.examineTime = examineTime;
	}

	public Integer getOpinion() {
		return opinion;
	}

	/**
	 * 0表示待查看，1表示处理中，2表示不通过，3表示通过
	 * 
	 * @param opinion
	 */
	public void setOpinion(Integer opinion) {
		this.opinion = opinion;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Apply getApply() {
		return apply;
	}

	public void setApply(Apply apply) {
		this.apply = apply;
	}

}
